package com.allinpay;

/**
 * @author : wushikai
 * <p>
 * date : 2020-11-14
 */

import java.io.Serializable;
// 创建Teacher类继承Person类
@MyAnn
public class Teacher extends Person implements Serializable, Comparable {

    public static int counter = 100;

    public static void test() {
        System.out.println("static test()");
    }

    public String name = "default";
    private int age = 18;
    private double salary = 1000.0;

    public Teacher() {
        System.out.println(counter);
    }

    private Teacher(String name, int age, double salary) {
        super();
        this.name = name ;
        this.age = age;
        this.salary = salary;
    }

    public void eat(String something) {
        System.out.println("老师在吃" + something);
    }

    public void eat(String something, int time) {
        System.out.println("老师在吃" + something + "吃了" + time + "小时");
    }

    @MyAnn(name = "李四", age = 40)
    private static final String concat(int i, double d, char c, boolean b) {
        return "" + i + d + c + b;
    }

    @Override
    public String toString() {
        return "Teacher [name=" + name + ", age=" + age + ", salary=" + salary + "]";
    }

    @Override
    public int compareTo(Object o) {
        return 0;
    }

}